Ext.define('Era.view.MenuItems',{
    extend: 'Ext.container.Container',
    alias: 'widget.menuitems',
    layout: 'vbox',
    width: 100,
    height: 300,
    
    items: [
        {
            xtype: 'button',
            text: 'About Us',
            width: 100,
            scale: 'medium',
            margin: '0 0 1 0',
            handler: function() {
                var screen = Ext.create('Era.view.InfoScreen');
                 
                // load form in the menu panel
                Era.controller.Main.showMenuScreen(screen);

            }
        },
        {
            xtype: 'button',
            text: 'New Event',
            width: 100,
            scale: 'medium',
            margin: '0 0 1 0',
            handler: function() {
                
                var record = new Era.model.Event();
                
                var screen = Ext.create('Era.view.EventScreen',{record:record});
                 
                // load form in the menu panel
                Era.controller.Main.showMenuScreen(screen);
            }
        },
        {
            xtype: 'button',
            text: 'Manage Events',
            width: 100,
            scale: 'medium',
            margin: '0 0 1 0',
            handler: function() {
                
                // create a grid with all events
                var screen = Ext.create('Era.view.ManageScreen',{store: Era.controller.Main.getStore('events')});
            
                // load grid in the menu panel
                Era.controller.Main.showMenuScreen(screen);
            }
        },
        {
            xtype: 'button',
            text: 'Timeline',
            disabled: true,
            width: 100,
            scale: 'medium',
            margin: '0 0 0 0',
            handler: function() {
                
            }
        },
        {
            xtype: 'button',
            text: 'Gallery',
            disabled: true,
            width: 100,
            scale: 'medium',
            margin: '0 0 1 0',
            handler: function() {

            }
        }
    ]
});